package com.yanqu.road.server.cmd.activity.hanghai;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.HangHaiActivityProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.hanghai.CrossHangHaiMgr;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C2_HANGHAI_ACTIVITY_UNION_ACTION, desc = "大航海商会变化")
public class CrossHangHaiUnionActionCmd extends CrossUnionCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        HangHaiActivityProto.CrossHangHaiUnionActionReqMsg reqMsg = HangHaiActivityProto.CrossHangHaiUnionActionReqMsg.parseFrom(packet.getBytes());
        CrossHangHaiMgr.getActivity(reqMsg.getActivityId(), groupId).unionActionByCmd(reqMsg);
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

    }

    @Override
    public void sendData() {

    }
}
